package org.caenv.interpreter.pojo.instructions.comparator;

import java.util.Map;

public class Comparator {

    public final static String ATTR_VALUE1 = "value1";
    public final static String ATTR_VALUE2 = "value2";

    private String value1;
    private String value2;

    public Comparator(Map<String, String> attributes) {

        if( attributes == null ||
           !attributes.containsKey(ATTR_VALUE1) ||
           !attributes.containsKey(ATTR_VALUE2) ){
           
            throw new IllegalArgumentException();
        }

        value1 = attributes.get(ATTR_VALUE1);
        value2 = attributes.get(ATTR_VALUE2);
    }

    public Comparator () {
        this.value1 = "1";
        this.value2 = "1";
    }

    public String getValue1() {
        return value1;
    }

    public String getValue2() {
        return value2;
    }

}
